package com.easy.work.function.message;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.widget.TextView;

import com.easy.work.R;
import com.easy.work.app.BaseActivity;
import com.easy.work.db.DataProvider;
import com.easy.work.db.MessageBean;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by admin on 2018/2/10.
 */

public class SystemMessageAct extends BaseActivity {

    private static final String MSG_TYPE = "MSG_TYPE";

    public static void start(Context ctx, MessageBean bean) {
        Intent intent = new Intent(ctx, SystemMessageAct.class);
        intent.putExtra(MSG_TYPE, bean);
        ctx.startActivity(intent);
    }

    @BindView(R.id.tv_first)
    TextView tvFirst;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.act_system_message);
        ButterKnife.bind(this);
        initTitle("系统消息");
        MessageBean msgBean = (MessageBean) getIntent().getSerializableExtra(MSG_TYPE);
        tvFirst.setText(msgBean.getCompanyName());
        DataProvider.updateReadState(this,msgBean);
    }
}
